package com.haste.service;

import com.haste.pojo.CommonResult;
import com.haste.pojo.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "PAYMENT8001")
@Component
public interface PaymentFeignService {
    //返回值类型得与服务者的controller层的一致
    @GetMapping("/payment/list")
    CommonResult list();

    @GetMapping("/payment/detail/{id}")
    CommonResult<Payment> detail(@PathVariable("id") Long id);

    @GetMapping("/payment/timeout")
    String paymentFeignTimeout();
}
